package com.phkj.qdh.ui.adapter.usercenter

import android.content.Context
import android.view.ViewGroup
import com.chad.library.adapter4.BaseQuickAdapter
import com.chad.library.adapter4.viewholder.QuickViewHolder
import com.phkj.qdh.R
import com.phkj.qdh.bean.UserMyNoticeTeamOrLawBean

class MyLawInspectAdapter: BaseQuickAdapter<UserMyNoticeTeamOrLawBean, QuickViewHolder>() {
    override fun onBindViewHolder(holder: QuickViewHolder, position: Int, item: UserMyNoticeTeamOrLawBean?) {
        holder.setText(R.id.tv_type_name, item?.inspect)
        holder.setText(R.id.tv_problem, "执法问题：")
        holder.setText(R.id.tv_problem_name, item?.problemName)
        holder.setText(R.id.tv_ban_fa, "处置办法：")
        holder.setText(R.id.tv_ban_fa_name, item?.processName)
        if (item?.scoreType == 0) {
            holder.setText(R.id.tv_fen, "预加分额：")
        } else {
            holder.setText(R.id.tv_fen, "预扣分额：")
        }
        holder.setText(R.id.tv_fen_name, item?.score.toString())
        holder.setText(R.id.tv_date, item?.inspectTime.toString())
        holder.setText(R.id.tv_tv_state, item?.status)
    }

    override fun onCreateViewHolder(
        context: Context, parent: ViewGroup, viewType: Int
    ): QuickViewHolder {
        return QuickViewHolder(R.layout.item_my_notice_team, parent)
    }
}